package org.zhigong.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.zhigong.entity.Menu;

import javax.servlet.http.HttpSession;
import java.util.List;

/**
 * Created by Administrator on 2018/5/10 0010.
 */
@Controller
@RequestMapping("/session")
public class SessionController {

    @Autowired
    private HttpSession session;

    @RequestMapping(value = "/menus",method = RequestMethod.GET)
    @ResponseBody
    public List<Menu> getUserMenuList(Menu menu) {
        return (List<Menu>)session.getAttribute("MENU_INFO");
    }

}
